<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center" width="20%">开通用户(手机号/邮箱号/昵称)</th>
            <th class="text-center" width="15%">有效开始时间</th>
            <th class="text-center" width="10%">有效结束时间</th>
            <th class="text-center" width="10%">状态</th>
            <th class="text-center" width="10%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover ">
            <tbody>
                <tr class="jqgfirstrow" role="row">
                    <td role="gridcell" width="20%"></td>
                    <td role="gridcell" width="15%"></td>
                    <td role="gridcell" width="10%"></td>
                    <td role="gridcell" width="10%"></td>
                    <td role="gridcell" width="10%"></td>
                </tr>
                <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="memberRecord : ${dataMap['list']}" th:attr="data-id=${memberRecord['id']}" th:attrappend="data-status=${memberRecord['status']}" th:attrprepend="id='memberRecord-'+${memberRecord['id']}">
                        <td class="text-center">
                            <p th:if="${memberRecord['user']}!=null and ${memberRecord['user']['mobile']}!=null and ${memberRecord['user']['mobile']}!=''" data-toggle="tooltip" data-placement="bottom" data-original-title="手机号" th:text="${memberRecord['user']['mobile']}"></p>
                            <p th:if="${memberRecord['user']}==null or ${memberRecord['user']['mobile']}==null or ${memberRecord['user']['mobile']}==''">—</p>
                            <p th:if="${memberRecord['user']}!=null and ${memberRecord['user']['mobile']}!='' and ${memberRecord['user']['mobile']}!=null" data-toggle="tooltip" data-placement="top" data-original-title="邮箱" th:text="${memberRecord['user']['email']}"></p>
                            <p th:if="${memberRecord['user']}==null or ${memberRecord['user']['email']}=='' or ${memberRecord['user']['email']}==null ">—</p>
                            <p th:if="${memberRecord['user']}!=null and ${memberRecord['user']['nickname']}!=null and ${memberRecord['user']['nickname']}!=''"data-toggle="tooltip" data-placement="top" data-original-title="昵称" th:text="${memberRecord['user']['nickname']}"></p>
                            <p th:if="${memberRecord['user']}==null or ${memberRecord['user']['nickname']}=='' or ${memberRecord['user']['nickname']}==null ">—</p>
                        </td>
                        <td class="text-center">
                            <span th:if="${memberRecord['beginTime']}=='' or ${memberRecord['beginTime']} ==null">—</span>
                            <span  th:if="${memberRecord['beginTime']}!=null" th:text="${#strings.substring(memberRecord['beginTime'],0,16)}"></span>
                        </td>
                        <td class="text-center">
                            <span th:if="${memberRecord['endTime']}=='' or ${memberRecord['endTime']} ==null">—</span>
                            <span  th:if="${memberRecord['endTime']}!=null" th:text="${#strings.substring(memberRecord['endTime'],0,16)}"></span>
                        </td>
                        <td class="text-center"  th:attr="id='member-record-status-'+${memberRecord['id']}">
                            <span th:if="${memberRecord['status']}==1" class="label label-info">正常</span>
                            <span th:if="${memberRecord['status']}==2" class="label label-danger">禁用</span>
                            <span th:if="${memberRecord['status']}==0 or ${memberRecord['status']}==null" class="label label-danger">—</span>
                        </td>
                        <td class="text-center">
                            <a href="javascript:;" th:if="${memberRecord['status']}==1" th:attr="data-id=${memberRecord['id']}"  data-status="2" class="c-master fs14 ml5 member-status-box" data-toggle="tooltip" data-placement="bottom" data-original-title="禁用"><i class="fa fa-unlock-alt"></i></a>
                            <a href="javascript:;" th:if="${memberRecord['status']}==2" th:attr="data-id=${memberRecord['id']}"  data-status="1" class="c-master fs14 ml5 member-status-box" data-toggle="tooltip" data-placement="bottom" data-original-title="恢复"><i class="fa fa-history"></i></a>
                        </td>
                    </tr>
                <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                    <td colspan="5" class="text-center">
                        <div class="noDataTipsBox">
                            <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>